package ecustom.common.servicelog.service;

import ecustom.common.CustomMap;
import ecustom.common.conn.DB;

public class ServiceService {

	public CustomMap getByCode(String code) throws Exception {
		String sql = "SELECT * FROM UF_ESERVICE WHERE CODE=?";
		return DB.conn().one(sql, code);
	}

	public CustomMap getByCodeCK(String code) throws Exception {
		CustomMap map = getByCode(code);
		if (map.isEmpty())
			throw new RuntimeException("Service code is not found, uf_eservice.code: " + code);
		return map;
	}
}
